/*
 * @Author: Starfish_DL
 * @Date: 2020-10-16 16:41:00
 * @LastEditors: Starfish_DL
 * @LastEditTime: 2020-10-16 16:44:22
 * @CurrentVersion: 1.0
 * @Description: 
 */

public class Test2 {
    /**
     * @author: Starfish_DL
     * @description: 定义了构造器后，默认无参构造器会被取消，所以必须使用已经构造好的构造器
     * @param {type} 
     * @return {type} 
     */
    public static void main(String[] args) {
    MyClass obj=new MyClass("Hello");
    obj.Info+=",World!";
    System.out.println(obj.Info);
    }
}

class MyClass {
    public String Info="Hello";
    public MyClass(String Info)
    {
        this.Info=Info;
    }
}